import time
from selenium import webdriver
from selenium.webdriver.common.by import By

driver=webdriver.Chrome()
driver.maximize_window()
driver.get("https://www.baidu.com")
time.sleep(1)
#就和写css选择器一样，#代表id，.代表class
driver.find_element(By.CSS_SELECTOR,'#kw').send_keys('从入门到放弃')
time.sleep(3)
driver.find_element(By.CSS_SELECTOR,'#su').click()
time.sleep(3)
driver.quit()
